// import 'dingtalk-jsapi/entry/mobile';
Page({
  data: {
    // tab切换 
    currentTab: 0,
    active: 1,
    //我负责
    aboutMe:[
        {"titleName":"强","taskTitle":"测试","taskType":"指派","taskStatus":"已完成","checkName":"王强","checkEndDay":"5","startTime":"2020-03-17 10:22:00","endTime":"2020-03-19 10:22:00","DName":"D分","overTimeCodeB":"10","completeCodeB":"10","CName":"C分","overTimeCodeC":"10","completeCodeC":"10"},
        {"titleName":"林","taskTitle":"负责页面","taskType":"招募","taskStatus":"已完成","checkName":"森林","checkEndDay":"3","startTime":"2020-05-17 10:00:00","endTime":"2020-06-01 10:00:00","DName":"D分","overTimeCodeB":"100","completeCodeB":"200","CName":"C分","overTimeCodeC":"10","completeCodeC":"20"},
        ],
    //我发布
    myPublish:[
        {"titleName":"林","taskTitle":"1233","taskType":"指派","taskStatus":"审核中","checkName":"王强","checkEndDay":"5","startTime":"2020-03-17 10:22:00","endTime":"2020-03-19 10:22:00","DName":"D分","overTimeCodeB":"10","completeCodeB":"10","CName":"C分","overTimeCodeC":"10","completeCodeC":"10"},
        {"titleName":"林","taskTitle":"发布页面","taskType":"招募","taskStatus":"审核中","checkName":"森林","checkEndDay":"3","startTime":"2020-05-17 10:00:00","endTime":"2020-06-01 10:00:00","DName":"D分","overTimeCodeB":"100","completeCodeB":"200","CName":"C分","overTimeCodeC":"10","completeCodeC":"20"},
        ],
    //我审核
    myReview:[
        {"titleName":"林","taskTitle":"456","taskType":"指派","taskStatus":"待审核","checkName":"森林","checkEndDay":"5","startTime":"2020-03-17 10:22:00","endTime":"2020-03-19 10:22:00","DName":"D分","overTimeCodeB":"10","completeCodeB":"10","CName":"C分","overTimeCodeC":"10","completeCodeC":"10"},
        {"titleName":"林","taskTitle":"审核页面","taskType":"招募","taskStatus":"待审核","checkName":"森林","checkEndDay":"3","startTime":"2020-05-17 10:00:00","endTime":"2020-06-01 10:00:00","DName":"D分","overTimeCodeB":"100","completeCodeB":"200","CName":"C分","overTimeCodeC":"10","completeCodeC":"20"},
        ],
    //我验收
    myAcceptance:[
        {"titleName":"强","taskTitle":"789","taskType":"指派","taskStatus":"已完成","checkName":"王强","checkEndDay":"5","startTime":"2020-03-17 10:22:00","endTime":"2020-03-19 10:22:00","DName":"D分","overTimeCodeB":"10","completeCodeB":"10","CName":"C分","overTimeCodeC":"10","completeCodeC":"10"},
        {"titleName":"林","taskTitle":"验收页面","taskType":"招募","taskStatus":"已完成","checkName":"森林","checkEndDay":"3","startTime":"2020-05-17 10:00:00","endTime":"2020-06-01 10:00:00","DName":"D分","overTimeCodeB":"100","completeCodeB":"200","CName":"C分","overTimeCodeC":"10","completeCodeC":"20"},
        ],
  },
  getDate:function(e){
        var date = new Date(); 
        //年  
        var Y = date.getFullYear();  
        //月  
        var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1);  
        //日  
        var D = date.getDate() < 10 ? '0' + date.getDate() : date.getDate();  
        var date =  Y+'-'+M+'-'+D;
        dd.datePicker({
            format: 'yyyy-MM-dd',
            currentDate: date,
            success: (res) => {
                dd.alert({
                    content: res.date,
                });
            },
        });
  },
  swiperChange(e) {
            console.log("==============="+e.detail.current);
            this.setData({
                currentTab: e.detail.current,
            })
    },
    swichNav(e) {
            console.log(e.target.dataset.current);
            var that = this;
            if (that.data.currentTab === e.target.dataset.current) {
                return false;
            } else {
                that.setData({
                    currentTab: e.target.dataset.current,
                })
            }
    },
})